#if !defined(AFX_SETTIMERDLG_H__C3A4ADA4_358E_48F8_AA65_21E27161636C__INCLUDED_)
#define AFX_SETTIMERDLG_H__C3A4ADA4_358E_48F8_AA65_21E27161636C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// SetTimerDlg.h : header file
//

/////////////////////////////////////////////////////////////////////////////
// CSetTimerDlg dialog
#include "Util\MinLabel.h"
#include "Util\MinButton.h"

#define	ALL_ITEM		4
#define	ALL_ITEM_MOTOR	2
#define	ALL_ITEM_VAC	3
#define	ALL_NAME		10

class CDMControlCenter;
class CTimeData;
class IAXIS1;
class ICylinder;
class IVacuum;
class CSystemData;

class CSetTimerDlg : public CDialog
{
// Construction
private:
// Construction
private:
	BOOL m_bBatchFlag;
	char m_cBufGet[50];
	char m_cbuf[50];

	int m_iIndex;
	int m_iOldPointSel;
	int m_iPointSel;
	int m_iCurPage;
	int m_iNameCount;
	int m_iTotalPage;
	double m_dTmp[ALL_ITEM][30];
	CTimeData* m_lnkTimeData;
	CSystemData* m_lnkSystemData;
	// 0:Motor 1:Cylinder 2:Vacuum
	int m_iType;
	CMinLabel	m_sData[ALL_ITEM][ALL_NAME];
	CMinButton	m_bName[ALL_NAME];

	IAXIS1* m_lnkMotor[ALL_MOTOR];
	ICylinder* m_lnkCylinder[ALL_CYLINDER];
	IVacuum* m_lnkVacuum[ALL_VACUUM];

public:
	void SetBatch(BOOL flag);
	void ItemSelect(int sel=0);
	void PointSelect(int sel=0);
	void Display(BOOL change=TRUE);
	
	CSetTimerDlg(IAXIS1** pMotor, CDMControlCenter* pDMControlCenter, CWnd* pParent = NULL);   // standard constructor
	CSetTimerDlg(ICylinder** pCylinder, CDMControlCenter* pDMControlCenter, CWnd* pParent = NULL);   // standard constructor
	CSetTimerDlg(IVacuum** pVacuum, CDMControlCenter* pDMControlCenter, CWnd* pParent = NULL);   // standard constructor

// Dialog Data
	//{{AFX_DATA(CSetTimerDlg)
	enum { IDD = IDD_SET_TIMER_DLG };
	CMinButton	m_bItem3;
	CMinButton	m_bItem2;
	CMinButton	m_bItem1;
	CMinButton	m_bItem0;
	CMinButton	m_bBatchInput;
	CMinButton	m_bPrev;
	CMinButton	m_bNext;
	CMinButton	m_bExit;
	CMinButton	m_bSave;
	//}}AFX_DATA


// Overrides
	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CSetTimerDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);    // DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:

	// Generated message map functions
	//{{AFX_MSG(CSetTimerDlg)
	afx_msg void OnSave();
	virtual void OnCancel();
	afx_msg void OnBatchInput();
	afx_msg void OnNext();
	afx_msg void OnPrevious();
	afx_msg void OnItem0();
	afx_msg void OnItem1();
	afx_msg void OnItem2();
	afx_msg void OnItem3();
	afx_msg void OnName0();
	afx_msg void OnName1();
	afx_msg void OnName2();
	afx_msg void OnName3();
	afx_msg void OnName4();
	afx_msg void OnName5();
	afx_msg void OnName6();
	afx_msg void OnName7();
	afx_msg void OnName8();
	afx_msg void OnName9();
	virtual BOOL OnInitDialog();
	//}}AFX_MSG
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_SETTIMERDLG_H__C3A4ADA4_358E_48F8_AA65_21E27161636C__INCLUDED_)
